<template>
  <div class="bgc">
    <div class="blueHead">我的</div>
    <router-link tag="div" :to="{ name: 'ChangeInfo'}" class="myCard">
      <div class="myImg">
        <img
          src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1607410015402&di=d4d7232b04f37e816a3e6193a8352141&imgtype=0&src=http%3A%2F%2Fb-ssl.duitang.com%2Fuploads%2Fitem%2F201710%2F01%2F20171001004645_WSZye.thumb.700_0.jpeg"
          alt=""
        />
      </div>
      <div class="myTitle">
        <p class="myName">{{ uname }}</p>
        <p class="myPosition">职务：主管</p>
      </div>
    </router-link>
    <ul class="myList">
      <li>
        <img src="../../assets/img/01.png" alt="" />
        <div>当前账户</div>
        <div class="uname">{{ uname }}</div>
      </li>
      <li>
        <img src="../../assets/img/02.png" alt="" />
        <div>工资查询</div>
        <van-icon name="arrow" class="myIcon" />
      </li>
      <li>
        <img src="../../assets/img/03.png" alt="" />
        <div>收藏</div>
        <van-icon name="arrow" class="myIcon" />
      </li>
      <router-link tag="li" :to="{ name: 'MySet' }">
        <img src="../../assets/img/04.png" alt="" />
        <div>设置</div>
        <van-icon name="arrow" class="myIcon" />
      </router-link>
    </ul>
    
  </div>
</template>

<script>
export default {
  name: "mine",
  data() {
    return {
      num: 0,
      uname: localStorage.user,
    };
  },
  methods: {},
  mounted() {},
};
</script>

<style scoped lang='less'>
.bgc {
  background: #fff;
  height: 100%;
  width: 100%;
}

.blueHead {
  width: 100%;
  height: 1rem;
  background: #4e90ff;
  font-size: 20px;
  text-align: center;
  color: rgb(255, 255, 255);
  line-height: 1rem;
  letter-spacing: 5px;
}
.myCard {
  width: 6.92rem;
  height: 2.18rem;
  border-radius: 10px;
  margin: 0.3rem auto;
  box-shadow: 0 0 2px 1px #bbb;
  position: relative;

  .myImg {
    float: left;
    width: 1.5rem;
    height: 1.5rem;
    overflow: hidden;
    border-radius: 50%;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0.6rem;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .myTitle {
    float: left;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0.42rem;
    p {
      line-height: 0.5rem;
    }
  }
}
.myList {
  margin: 0 0.3rem;

  li {
    width: 100%;
    height: 1.02rem;
    .uname {
      float: right;
      margin-right: 0.2rem;
    }
    img {
      width: 0.6rem;
      float: left;
      position: relative;
      top: 50%;
      transform: translateY(-50%);
    }
    div {
      margin-left: 0.2rem;
      float: left;
      height: 100%;
      line-height: 1.02rem;
    }
    .myIcon {
      position: relative;
      top: 50%;
      transform: translateY(-50%);
      float: right;
    }
  }
}
</style>